package com.ay.selfservicemachine.receiver;


import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class ScanResultReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        // 处理接收到的广播
        String action = intent.getAction();
        if (action != null) {
            switch (action) {
                case Intent.ACTION_AIRPLANE_MODE_CHANGED:
//                    boolean isAirplaneModeOn = intent.getBooleanExtra("state", false);
                    break;
                case "com.example.MY_CUSTOM_ACTION":
                    // 处理自定义广播
//                    String data = intent.getStringExtra("data");
                    break;
            }
        }
    }
}

